package com.example.medicine.controller;

import com.example.medicine.Bean.yian.yian;
import com.example.medicine.Mapper.WorkloadMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@Slf4j
@RestController
@RequestMapping(value="/workload")
public class WorkloadController {
@Autowired
    WorkloadMapper workloadMapper;
    @RequiresPermissions("工作量统计")
        @GetMapping("/")
        public List<yian> getworkloadList() {
        log.info("getworkloadList获取工作量统计信息");
            // 从数据库中获取数据
            return workloadMapper.getAll();
        }

}
